//
//  LogoView.m
//  MSJD
//
//  Created by xiangbo on 2018/9/24.
//  Copyright © 2018 xiangbo. All rights reserved.
//

#import "MSLogoView.h"

@implementation MSLogoView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupSubViews];
    }
    return self;
}


- (void)setupSubViews{
    UIImageView *logo = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"logo"]];
    [self addSubview:logo];
    
    UILabel *appName = [[UILabel alloc] init];
    appName.font = [UIFont systemFontOfSize:30];
    appName.text = MS_APP_BUNDLE_DISPLAT_NAME;
    appName.textColor = MSThemeColor;
    [self addSubview:appName];
    
    [logo mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.equalTo(self.mas_top);
        make.width.height.offset(96);
    }];
    
    [appName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(logo.mas_bottom).offset(8);
        make.centerX.equalTo(self);
    }];
    
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
